package zigzag.designpattern.mediator;

import java.awt.event.ActionListener;
import javax.swing.JButton;

public class BtnHalt extends JButton implements Command {
    Mediator med;
    BtnHalt(ActionListener al, Mediator m) {
        super("Halt");
        addActionListener(al);
        med = m;
        med.registerHalt(this);
    }
    public void execute() {
       med.halt();
    }
}
